package maria.carne.cat;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

public class mainpage extends Activity {
	
	Background bg;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.play);
		bg = (Background)findViewById(R.id.bg);
		ImageButton play = (ImageButton) findViewById(R.id.playbutton);
		play.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent("maria.carne.cat.GAME");
				startActivity(i);
			}
		});
	}

	@Override
	protected void onPause() {
		bg.stopthread();
		super.onPause();
	}

	@Override
	protected void onResume() {
		bg.startthread();
		super.onResume();
	}
}
